package com.yx.changdao.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yx.changdao.common.annotation.AutoFill;
import com.yx.changdao.common.utils.SysUtils;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;


@TableName(ProblemDeal.TABLE_NAME)
@Setter
@Getter
public class ProblemDeal implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 数据库名
     */
    public static final String TABLE_NAME = "problem_deal";

    /**
     * 问题处理结果id
     */
    public static final String ID = "id";
    /**
     * 问题id
     */
    public static final String PROBLEM_ID = "problem_id";
    /**
     * 处理结果(上传的处理结果)
     */
    public static final String DEAL_CONTENT = "deal_content";
    /**
     * 处理结果附图(图片地址的json列表)
     */
    public static final String DEAL_IMAGES = "deal_images";
    /**
     * 创建时间
     */
    public static final String CREATE_TIME = "create_time";
    /**
     * 创建人
     */
    public static final String CREATE_BY_NAME = "create_by_name";
    /**
     * 创建人id
     */
    public static final String CREATE_BY = "create_by";
    /**
     * 更新时间
     */
    public static final String UPDATE_TIME = "update_time";
    /**
     * 更新人
     */
    public static final String UPDATE_BY_NAME = "update_by_name";
    /**
     * 更新人id
     */
    public static final String UPDATE_BY = "update_by";


    public static final String CURRENT_DEP_ID = "current_dep_id";
    public static final String CURRENT_DEP_NAME = "current_dep_name";
    public static final String DEAL_USERNAME = "deal_username";
    public static final String BACK2DEAL_CONTENT = "back2deal_content";
    public static final String BACK2DEAL_TIME = "back2deal_time";
    /**
     * 问题处理人手机号
     */
    public static final String DEAL_PHONE = "deal_phone";
    /**
     * 当前处理部门ID
     */
    private Integer currentDepId;
    /**
     * 当前处理部门名称
     */
    private String currentDepName;
    /**
     * 当前处理人姓名
     */
    private String dealUsername;
    /**
     * 当前处理人电话
     */
    private String dealPhone;
    /**
     * 打回处理批复
     */
    private String back2dealContent;
    /**
     * 打回处理时间
     */
    private Date back2dealTime;


    /**
     * 问题处理结果id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 问题id
     */
    private Integer problemId;
    /**
     * 处理结果(上传的处理结果)
     */
    private String dealContent;
    /**
     * 处理结果附图(图片地址的json列表)
     */
    private String dealImages;
    /**
     * 创建时间
     */
    @AutoFill
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 创建人
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserName")
    @TableField(fill = FieldFill.INSERT)
    private String createByName;
    /**
     * 创建人id
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserId")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;
    /**
     * 更新时间
     */
    @AutoFill
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /**
     * 更新人
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserName")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateByName;
    /**
     * 更新人id
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserId")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;



}
